﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Acoris.Rendering
{
    /// <summary>
    /// 表示可视化元素的视觉子级元素
    /// </summary>
    public sealed class VisualElementChildren:IEnumerable<VisualElement>
    {
        private List<VisualElement> m_visualElementLogicalChildren;

        /// <summary>
        /// 
        /// </summary>
        public VisualElementChildren()
        {
            m_visualElementLogicalChildren = new List<VisualElement>();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="element"></param>
        public void Add(VisualElement element)
        {

        }
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="element"></param>
        public void Remove(VisualElement element)
        {

        }

        /// <summary>
        /// 
        /// </summary>
        public void Clear()
        {

        }

        /// <summary>
        /// 获取用于遍历当前可视化元素的子元素的枚举器
        /// </summary>
        /// <returns>返回用于遍历当前可视化元素的子元素的枚举器</returns>
        public IEnumerator<VisualElement> GetEnumerator()
        {
            return m_visualElementLogicalChildren.GetEnumerator();
        }

        /// <summary>
        /// 获取用于遍历当前可视化元素的子元素的枚举器
        /// </summary>
        /// <returns>返回用于遍历当前可视化元素的子元素的枚举器</returns>
        IEnumerator IEnumerable.GetEnumerator()
        {
            return m_visualElementLogicalChildren.GetEnumerator();
        }

        /// <summary>
        /// 
        /// </summary>
        public int Count {
            get {
                return m_visualElementLogicalChildren.Count;
            }
        }
    }
}
